import request from '../utils/request'

export function getlists(params) {
  return request({
    url: '/api/sys/role',
    method: 'GET',
    'params': params
  })
}
export function dellists(id) {
  return request({
    url: `/api/sys/role/${id}`,
    method: 'delete'
  })
}
export function addlists(data) {
  return request({
    url: 'api/sys/role',
    method: 'post',
    data
  })
}
export function editlists(data) {
  return request({
    url: `api/sys/role/${data.id}`,
    method: 'put',
    data
  })
}
export function getinfo(id) {
  return request({
    url: `/api/sys/role/${id}`,
    method: 'GET'
  })
}
export function getRoleDetail(id) {
  return request({
    url: `api/sys/role/${id}`
  })
}
export function assignPerm(data) {
  return request({
    url: 'api/sys/role/assignPrem',
    method: 'put',
    data
  })
}
